package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.ZjWithdraw;
import com.zb.extend.WithdrawExtend;
import com.zb.mobile.WithdrawRecordListSearchMobileVo;
import com.zb.vo.WithdrawListSearchVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 提现表 服务类
 * </p>
 *
 * @author WEN
 * @since 2024-05-27
 */
public interface ZjWithdrawService extends IService<ZjWithdraw> {

    /**
     * 获取提现单列表
     * @param custAccId 商家ID
     * @param search 搜索关键词
     * @return
     */
    List<WithdrawExtend> getList(Long custAccId, WithdrawListSearchVo search);

    /**
     * 导出提现单列表
     * @param custAccId 商家ID
     * @param search 搜索关键词
     * @return
     */
    List<WithdrawExtend> getWithdrawOrderList(Long custAccId, WithdrawListSearchVo search);
    /**
     * 获取提现单列表总记录数
     * @param custAccId 商家ID
     * @param search 搜索关键词
     * @return
     */
    long getListCount(Long custAccId, WithdrawListSearchVo search);

    /**
     * 获取提现记录列表
     * @param networkId 服务商ID
     * @param networkEmpId 服务人员ID
     * @param search 搜索对象
     * @return
     */
    List<WithdrawExtend> getWithdrawRecordList(Long networkId, Long networkEmpId, WithdrawRecordListSearchMobileVo search);

    /**
     * 获取提现记录列表总记录数
     * @param networkId 服务商ID
     * @param networkEmpId 服务人员ID
     * @param search 搜索对象
     * @return
     */
    long getWithdrawRecordListCount(Long networkId, Long networkEmpId, WithdrawRecordListSearchMobileVo search);

    /**
     * 获取已申请提现未审核的金额
     * @param networkId 服务商ID
     * @param networkEmpId 服务人员ID
     * @return
     */
    BigDecimal getApplyWithdrawMoney(Long networkId, Long networkEmpId);

    /**
     * 获取已提现的累计金额
     * @param networkId 服务商ID
     * @param networkEmpId 服务人员ID
     * @return
     */
    BigDecimal getTotalWithdrawMoney(Long networkId, Long networkEmpId);

    /**
     * 根据工单ID获取提现单
     * @param workId 工单ID
     * @return
     */
    ZjWithdraw getByWorkId(Long workId);
}
